{extend name="public/base"}

{block name="main"}
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 征集广告语
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="Hui-article">
    <article class="cl pd-20">
        <div class="mt-20">
            <table class="table table-border table-bordered table-hover table-bg table-sort">
                <thead>
                <tr class="text-c">
                    <th width="80">ID</th>
                    <th width="100">姓名</th>
                    <th width="100">性别</th>
                    <th width="100">电话</th>
                    <th width="200">邮箱</th>
                    <th width="300">公司名</th>
                    <th width="300">公司地址</th>
                    <th width="300">备注信息</th>
                    <th width="300">付款状态</th>
                    <th width="300">二维码付款</th>
                </tr>
                </thead>
                <tbody>
                {volist name="data" id="vo"}
                <tr class="text-c">
                    <td>{$vo.id}</td>
                    <td><u style="cursor:pointer" class="text-primary">{$vo.username}</u></td>
                    <td><u style="cursor:pointer" class="text-primary">{if $vo.sex eq 1}男{else}女{/if}</u></td>
                    <td><u style="cursor:pointer" class="text-primary">{$vo.mobile}</u></td>
                    <td><u style="cursor:pointer" class="text-primary">{$vo.email}</u></td>
                    <td><u style="cursor:pointer" class="text-primary">{$vo.company}</u></td>
                    <td><u style="cursor:pointer" class="text-primary">{$vo.address}</u></td>
                    <td><u style="cursor:pointer" class="text-primary">{$vo.remark}</u></td>
                    <td><u style="cursor:pointer" class="text-primary">{if $vo.status eq 0}未支付{else}已支付{/if}</u></td>
                    <td><u style="cursor:pointer" class="text-primary">
                        {if $vo.status eq 0}
                            <input type="button" class="get" value="点击获取二维码">
                            <input type="hidden" value="{$vo.id}">
                            <img src="" style="width: 100px; height: 100px; display:none" class="qr_code">
                        {else}
                            已支付
                        {/if}</u></td>
                </tr>
                {/volist}
                </tbody>
            </table>
        </div>
        <div class="cl pd-5 bg-1 bk-gray tp5-page mt-20">
            {$data->render()}
        </div>
    </article>
</div>
<script src="__STATIC__/admin/js/jquery-2.0.3.min.js" charset="utf-8"></script>
<script>
    $('.get').on('click',function () {
        var that=$(this);
        var _order_id = $(this).next("input").val();
        $.get("{:url('get_qr_code')}", {order_id : _order_id, url : 'http://www.hnjyxh.com/index/activity/enlist_pay.html?order_id='+_order_id}, function (msg) {
            if (msg.code == 200) {
                console.log('ok');
                that.css("display","none");
                that.next().next().css('display','');
                that.next().next().attr('src', '/' + msg.path);
            }
        });
    })
</script>
{/block}